<%@page import="sedev.shopping.entities.ListNhomSanPham"%>
<%@ include file="/init.jsp" %>
<%@include file="../script.jsp" %>
<%
	ListNhomSanPham listnhomsanpham = (ListNhomSanPham)request.getAttribute("listnhomsanpham");
%>
<div class="menu-box">
	<%@include file="../menu.jsp" %>
</div>
<div id="content-box">
	<div class="padding">
	    <div id="toolbar-box">
	       <div class="t">
	           <div class="t">
	               <div class="t"></div>
	           </div>
	       </div>
	       <div class="m">
	           <div id="toolbar" class="toolbar">
	               <table class="toolbar">
	                   <tbody>
	                       <tr>
								<td id="toolbar-save" class="button">
									<a class="toolbar" href="javascript:void(0)" onclick="shopping.postFormProductGroup('adminform')">
									    <span title="Save" class="icon-32-save">
									    </span>
									    <liferay-ui:message key="label-save" />
									</a>
								</td>
								<td id="toolbar-cancel" class="button">
								    <a class="toolbar" href='<s:url action="productGroup"></s:url>'>
								        <span title="Cancel" class="icon-32-cancel">
								        </span>
								        <liferay-ui:message key="label-cancel" />
								    </a>
								</td>
	                       </tr>
	                   </tbody>
	               </table>
	           </div>
	           <div class="header icon-48-article">
	               <liferay-ui:message key="label-add-product-group" />
	           </div>
	           <%
				Integer errorCode = (Integer)request.getAttribute("errorCode");
				if(errorCode!=null ){%>
					<dl id="system-message">
					    <%if(errorCode < 0){%>
					    <dd class="error message fade">
						    <ul>
						        <li><liferay-ui:message key="label-execute-error" /></li>
						    </ul>
						</dd>
						
					<%}else{%>
						<dd class="message message fade">
						    <ul>
						        <li><liferay-ui:message key="label-execute-success" /></li>
						    </ul>
						</dd>
					<%}%>
					</dl>
				<%}%>
	           <div class="clr"></div>
	       </div>
	       <div class="b">
	           <div class="b">
	               <div class="b"></div>
	           </div>
	       </div>
	    </div>
	    <div id="element-box">
	        <div class="t">
	           <div class="t">
	               <div class="t"></div>
	           </div>
	        </div>
	        <div class="m">
				<form action='<s:url action="addProductGroup"></s:url>' method="post" id="adminform" name="adminform">
				    <table width="100%">
				        <tr>
				            <td width="15%">
				                <label><liferay-ui:message key="label-product-group-name" /> :</label>
				            </td>
				            <td>
				                <input id="title" type="text" name="title" value="" size="50" maxlength="255"/>
				            </td>
				        </tr>
				        <tr>
				            <td>
				                <label><liferay-ui:message key="label-product-group-parent" /></label>
				            </td>
				            <td>
				                <select id=groupparent name="groupparent" style="width: 150px">
				                    <option value="0">- <liferay-ui:message key="label-choose-product-group" /> -</option>
									<%
									if(listnhomsanpham != null && listnhomsanpham.size()>0){
										for(int index=0; index<listnhomsanpham.size() ;++index){%>
									<option value="<%=listnhomsanpham.get(index).getId()%>"><%=listnhomsanpham.get(index).getTen()%></option>
										<%}
									}%>				                                      
				                </select>
				                <script type="text/javascript">
				                	// script
				                </script>
				            </td>				            
				        </tr>
				        <tr>				            
				            <td>
				                <label><liferay-ui:message key="label-publish" /> :</label>                                         
				            </td>
				            <td>
				                <input type="radio" value="0" name="published" /><label><liferay-ui:message key="label-hide" /></label>
				                <input type="radio" value="1" name="published" checked="checked"/><label><liferay-ui:message key="label-display" /></label>
				            </td>
				        </tr>			        
				        <tr>
				            <td>
				                <label><liferay-ui:message key="label-attribute" /> :</label>
				            </td>
				            <td>
								<div>
									<a class="toolbar" href="javascript:void(0)" onclick="shopping.addAtribite('showAttribute','attribute','Attribute')">
									    <span title="New" class="icon-32-new"></span>
									</a>
								</div>								
				            </td>
				        </tr>
				         <tr>
				            <td></td>
				            <td>
				            	<div id="showAttribute">
								</div>
								<input type="hidden" name="attribute" id="attribute" />
				            </td>
				        </tr>
				    </table>				    
				</form>
	        </div>
	        <div class="b">
	           <div class="b">
	               <div class="b"></div>
	           </div>
	        </div>
	    </div>
	</div>
</div>